void testAliRoot(TString proof="kiaf.sdfarm.kr",TString aliroot="VO_ALICE@AliRoot::v4-21-09-AN",TString alirootMode="ALIROOT") {

  alirootMode="";
  TStopwatch timer;
  
  TList *list = new TList;
  // aliroot mode
  if (!alirootMode.IsNull())
    list->Add(new TNamed("ALIROOT_MODE", alirootMode.Data()));  

//   aliroot extra libs
  TString extraLibs="ANALYSIS:ANALYSISalice:CORRFW";
  TString extraLibs="CORRFW:PWG2resonances";
  
  if (alirootMode.IsNull())
    list->Add(new TNamed("ALIROOT_EXTRA_LIBS", "CORRFW:PWG2resonances"));
  else
    list->Add(new TNamed("ALIROOT_EXTRA_LIBS", "ANALYSIS:ANALYSISalice:CORRFW:PWG2resonances"));
    

  list->Add(new TNamed("ALIROOT_EXTRA_INCLUDES", "PWG2/RESONANCES:TOF"));

  // aliroot aaf debug
  list->Add(new TNamed("ALIROOT_AAF_DEBUG", "5"));
  
  // enable alien
  list->Add(new TNamed("ALIROOT_ENABLE_ALIEN", "1"));
	list->Add(new TNamed("ALIROOT_ALIEN_RETRY", "10"));
  
  TProof *p = TProof::Open(proof.Data());
  if (!p) {
    Error("runSKAF.C","Connection to proof cluseter failed!!!!");
    return;
  }
  p->ShowPackages();
//   p->Exec("gSystem->Load(\"libGui\")");
  timer.Start();

	if (p->EnablePackage(aliroot.Data(),list)) return;

//   if (p->UploadPackage("ANALYSIS")) return;
//   if (p->EnablePackage("ANALYSIS")) return;
//   if (p->UploadPackage("ANALYSISalice")) return;
//   if (pf->EnablePackage("ANALYSISalice")) return;
  
  timer.Stop();
  timer.Print();
}
